Skip to content

fix(scripts): include jwt in FORBIDDEN_CONTENT hard-block detector#8408

Merged
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
marktech0813:fix/8396-forbidden-content-jwt
Jul 24, 2026
Merged

fix(scripts): include jwt in FORBIDDEN_CONTENT hard-block detector#8408
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
marktech0813:fix/8396-forbidden-content-jwt

Conversation

@marktech0813

Copy link
Copy Markdown
Contributor

Summary

`jwt` is in `HARD_SECRET_KINDS` but `scripts/forbidden-content.ts` omitted it, so miner/mcp pack checks missed JWT-shaped credentials.

Add the exact `jwt` regex from `secret-patterns.ts` and correct the header. `seed_or_mnemonic` / `bittensor_key` remain excluded.

Closes #8396

Test plan

  • `forbidden-content.test.ts` — jwt matches; seed/bittensor still excluded

Made with Cursor

jwt is in HARD_SECRET_KINDS but was omitted from the packaged-secret
copy in forbidden-content.ts, so miner/mcp tarball checks missed JWTs.

Closes JSONbored#8396
@marktech0813
marktech0813 requested a review from JSONbored as a code owner July 24, 2026 11:45
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.42%. Comparing base (8a6632b) to head (510a418).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8408   +/-   ##
=======================================
  Coverage   92.42%   92.42%           
=======================================
  Files         791      791           
  Lines       79251    79251           
  Branches    23948    23947    -1     
=======================================
  Hits        73244    73244           
  Misses       4868     4868           
  Partials     1139     1139           
Flag Coverage Δ
shard-1 56.36% <ø> (ø)
shard-2 53.07% <ø> (ø)
shard-3 53.04% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 24, 2026
@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-24 12:35:39 UTC

2 files · 1 AI reviewer · no blockers · readiness 93/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 2 non-blocking
  • The PR doesn't show the regex from secret-patterns.ts side-by-side, so I can't independently verify the copied jwt pattern is byte-for-byte identical to the source of truth — worth double-checking in review that no character was altered during the copy.
  • scripts/forbidden-content.ts:38 — since this is a manual copy (not an import) from secret-patterns.ts, consider adding a lightweight test or comment noting the last-verified-in-sync date to catch future drift between the two regex sources.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8396
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 98 registered-repo PR(s), 15 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor marktech0813; Gittensor profile; 98 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Review context
  • Author: marktech0813
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 98 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit ca066b2 into JSONbored:main Jul 24, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

forbidden-content.ts's packaged-secret detector is missing the jwt shape now present in secret-patterns.ts's HARD_SECRET_KINDS

1 participant